<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>新建收货地址</title>
	<link rel="stylesheet" href="__PUBLIC__/Mobile/css/zhang.css">
	<script src="__PUBLIC__/Mobile/js/jquery-1.7.2.min.js"></script>
	<script src="__PUBLIC__/Mobile/Layer/layer.min.js"></script>
</head>

<body >
<div class="lm">
	<a href="javascript:history.back(-1);">
		<img src="__PUBLIC__/Mobile/images/return.png" style="height:22px; padding-left:2%; line-height:22px; width:6%; padding-top:2%;" class="left">
	</a>
    <span class="left size20">新建收货地址 </span>
</div>
<section>
<!--新建收货地址-->
<form action="__SELF__" method="POST" onSubmit="return check();">
<div class="Write">
	<p><b>收货人</b>
    <input type="text" placeholder="请输入收货人" name="realname"></p>
	<p><b>手机号码</b>
    <input type="text" placeholder="请输入手机号码" name="mobile"></p>
    <script src="__PUBLIC__/Mobile/js/jquery.cityselect.js" type="text/javascript" style="border:0;"></script>
	<p><b>省市地区</b>
    	<span class="userAddItem"  id="city" style="color:#ABAEBB; font-size:1.2em; line-height:30px;  width:65%;">
		        <select class="prov"  id="prov"   name="prov"  style="width:28%; border:none;color:#AEA9BB;font-size:1em;"></select>
		        <select class="city"  id="city"  name="city" disabled="disabled" style="width:28%;border:none;color:#AEA9BB;font-size:1em;"></select>
		        <select class="dist" id="dist"   name="dist" disabled="disabled" style="width:28%; border:none;color:#AEA9BB;font-size:1em;"></select>
		 </span>
	<p><b>详细地址</b>
    <textarea name="address" cols="" rows=""  id="address">
    </textarea></p>
	<p class="default"><b>设为默认地址</b>
    	<input type="checkbox" style="width:70%; padding-left:50%; height:1.2em; border:1px solid #CCC;" name="status" value="1" />
    </p>
	<p><b>邮编</b>
    <input type="text" placeholder="请输入邮政编码" name="zipcode"></p>
</div>
<button type="submit" name="submit" class="immediately2 size26" style="border:none;">保存地址</button>
</form>
</section>
<script>
	$(function(){
		  $("#city").citySelect({
		        url:"__PUBLIC__/Mobile/js/city.min.js",
		        prov: "安徽",//默认值  可写可不写
		        city: "合肥",
		        dist: "蜀山区",
		        nodata: "none"
		  });
		});
	
	
	function check(){
		var realname = $('input[name="realname"]').val();
		var mobile = $('input[name="mobile"]').val();
		var zipcode = $('input[name="zipcode"]').val();
		var address = $('#address').val();
		if(realname == ''){
			layer.msg('收货人不能为空');
			return false;
		}
		if(mobile == ''){
			layer.msg('手机号码不能为空');
			return false;
		}
		if(zipcode == ''){
			layer.msg('邮编不能为空');
			return false;
		}	
		if(address == ''){
			layer.msg('详细地址不能为空');
			return false;
		}
		return true;
	}
	</script>
</body>
</html>
